package iodemo;

import java.io.*;

public class BufferedRW
{
    public static void main (String[] args)
    {
        try(BufferedReader bufferedReader = new BufferedReader(new FileReader("D:/iKnowIKnow.txt"));
            PrintWriter printWriter = new PrintWriter("D:/213.txt"))
        {
            String temp = "";
            while((temp = bufferedReader.readLine()) != null)
            {
                System.out.println(temp);
            }
    
            printWriter.println("写入内容");
            
            printWriter.flush();
        }
        catch(IOException e)
        {
            e.printStackTrace();
        }
    }
}
